import request from '../utils/request.js'

// 请求首页数据
export const getData = () => {
  // 返回一个promise对象
  return request.get('/home/getData')
}

// 返回用户列表
export const getUser = (params) => {
  return request.get('/user/getUser', params)
}

// 添加用户
export const addUser = (data) => {
  return request.post('/user/add', data)
}

// 编辑用户
export const editUser = (data) => {
  return request.post('/user/edit', data)
}

// 删除用户
export const delUser = (data) => {
  return request.post('/user/del', data)
}
// 用户权限获取菜单
export const getMenu = (data) => {
  return request.post('/permission/getMenu', data)
}
